package com.fastwire.alarm.admin.model.bussinessobject;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the al_tb_group_access database table.
 * 
 */
@Embeddable
public class AlTbGroupAccessPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="n_group_user_id", unique=true, nullable=false)
	private int nGroupUserId;

	@Column(name="n_menu_id", unique=true, nullable=false)
	private int nMenuId;

    public AlTbGroupAccessPK() {
    }
	public int getNGroupUserId() {
		return this.nGroupUserId;
	}
	public void setNGroupUserId(int nGroupUserId) {
		this.nGroupUserId = nGroupUserId;
	}
	public int getNMenuId() {
		return this.nMenuId;
	}
	public void setNMenuId(int nMenuId) {
		this.nMenuId = nMenuId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof AlTbGroupAccessPK)) {
			return false;
		}
		AlTbGroupAccessPK castOther = (AlTbGroupAccessPK)other;
		return 
			(this.nGroupUserId == castOther.nGroupUserId)
			&& (this.nMenuId == castOther.nMenuId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.nGroupUserId;
		hash = hash * prime + this.nMenuId;
		
		return hash;
    }
}